import React from 'react'
import { HashRouter as Router, Route, Switch, NavLink } from 'react-router-dom'

import PageA from './views/PageA'
import PageB from './views/PageB'

const App = () => {
  return(
    <Router>
    <div>
      <h1>App</h1>
      <ul>
        <li><NavLink to='/a'>A</NavLink></li>
        <li><NavLink to='/b'>B</NavLink></li>
      </ul>
      <Switch>
      <Route path='/a' component={PageA}></Route>
      <Route path='/b' component={PageB}></Route>
      </Switch>
    </div>
    </Router>
  )
}

export default App